<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorator="layouts/layout" th:with="header='打印标签', subtext='手动打印物料标签'">

<head>
  <title>打印标签</title>
</head>
<body>
<th:block layout:fragment="content">
  <div class="box">
    <div class="box-body">
      <form id="printtaskLabelForm" name="printtaskLabelForm" th:object="${m}" th:action="@{|${baseUrl}/printlabel${m.labeldataid==null?'':'/' + m.labeldataid}|}" method="post" class="form-horizontal" novalidate="novalidate">
        <input id="labeldataid" type="hidden" name="labeldataid" th:field="*{labeldataid}" />
        <div class="row line">
          <div class="col-lg-6">
            <h3 class="page-header">标签信息</h3>
          </div>
        </div>

        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">物料编号</label>
              <div class="col-sm-8 form-control-static">
                <input id="materialcode" name="materialcode" th:value="*{materialcode}" maxlength="20" th:readonly="false"  class="form-control required" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">物料名称</label>
              <div class="col-sm-8 form-control-static">
                <input id="materialname" name="materialname" th:value="*{materialname}" maxlength="20" th:readonly="false"
                       class="form-control" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">规格</label>
              <div class="col-sm-8 form-control-static">
                <input id="materialspec" name="materialspec" th:value="*{materialspec}" maxlength="20" th:readonly="false"
                       class="form-control " />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">批号</label>
              <div class="col-sm-8 form-control-static">
                <input id="lotnumber" name="lotnumber" th:value="*{lotnumber}" maxlength="20" th:readonly="false"
                       class="form-control required" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">数量</label>
              <div class="col-sm-8 form-control-static">
                <input id="total" name="total" th:value="*{total}" maxlength="20" th:readonly="false"
                       class="form-control required" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">单位</label>
              <div class="col-sm-8 form-control-static">
                <input id="uomname" name="uomname" th:value="*{uomname}" maxlength="20" th:readonly="false"
                       class="form-control" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">供应商编码</label>
              <div class="col-sm-8 form-control-static">
                <input id="suppliercode" name="suppliercode" th:value="*{suppliercode}" maxlength="20" th:readonly="false"
                       class="form-control required" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
              <div class="form-group">
                  <label class="control-label col-sm-3 mg-top-6 ">供应商名称</label>
                  <div class="col-sm-8 form-control-static">
                      <input id="suppliername" name="suppliername" th:value="*{suppliername}" maxlength="20" th:readonly="false"
                             class="form-control" />
                  </div>
              </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">容器编码</label>
              <div class="col-sm-8 form-control-static">
                <input id="containnumber" name="containnumber" th:value="*{containnumber}" maxlength="20" th:readonly="false"
                       class="form-control" />
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-6">
              <div class="form-group">
                  <label class="control-label col-sm-3 mg-top-6 ">打印数量</label>
                  <div class="col-sm-8 form-control-static">
                      <input id="copies" name="copies" th:value="*{copies}" maxlength="20" th:readonly="false"
                             class="form-control" />
                  </div>
              </div>
          </div>
       </div>
        <div class="row">
          <div class="col-sm-6">
            <div class="form-group">
              <label class="control-label col-sm-3 mg-top-6 ">打印机</label>
              <div class="col-sm-8 form-control-static">
                <input id="printer" name="printer" th:value="*{printer}" maxlength="20" th:readonly="false"
                       class="form-control" />
              </div>
            </div>
          </div>
        </div>


        <div class="hr-line-dashed"></div>
        <div class="form-group">
          <div class="text-center">
            <a class="btn btn-default " th:href="@{|${baseUrl}/cancel|}">
              <i class="fa fa-fw fa-reply"></i> 返回
            </a>
            <button type="submit" class="btn btn-primary">
              <i class="fa fa-fw  fa-save"></i> 确认
            </button>
          </div>
        </div>
      </form>
    </div>
  </div>
</th:block>
<th:block layout:fragment="scripts">

  <script th:replace="layouts/fragments/validatejs :: validate">
  </script>

  <script th:inline="javascript">
  </script>

  <script th:inline="javascript">
      // 后端传入前端使用的变量JS中定义
      var batchIds = /*[[${ids}]]*/'';
  </script>
  <script th:src="@{|${theme}/js/app/task/printtask_label_form.js?v=${applicationVersion}|}" th:inline="javascript"></script>
</th:block>
</body>

</html>